package com.ponhu.ea2.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author luyu
 * @create 2021-11-23 10:22
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "保存新增物料信息")
public class PhMaterialDto extends OperatorDto implements Serializable {

    @NotNull(message = "三级分类id不能为空")
    @ApiModelProperty(value = "三级分类id", required = true)
    private Long categoryId;

    @NotNull(message = "品牌id不能为空")
    @ApiModelProperty(value = "品牌id", required = true)
    private Long brandId;

    @ApiModelProperty(value = "系列")
    private String series;

    @ApiModelProperty(value = "型号")
    private String model;

    @NotEmpty(message = "主图不能为空")
    @ApiModelProperty(value = "主图", required = true)
    private String mainImage;

    @ApiModelProperty(value = "单位")
    private String unit = "件";

    @ApiModelProperty(value = "官网售价")
    private BigDecimal officialPrice;

    @NotNull(message = "适用人群不能为空")
    @ApiModelProperty(value = "适用人群")
    private Integer applyCrowd;

    @NotEmpty(message = "上市时间不能为空")
    @ApiModelProperty(value = "上市时间")
    private String marketDate;

    @ApiModelProperty(value = "属性集合")
    private List<PhPropertyValueDto> propertyList;

    @NotEmpty(message = "物料名称不能为空")
    @ApiModelProperty(value = "物料名称")
    private String materialName;

    @ApiModelProperty(value = "AI识图唯一标识")
    private String itemId;

    @ApiModelProperty(value = "物料卖点")
    private String sellingPoint;

}
